<!--
 * @Description:
 * @Author: cgt
 * @Date: 2021-12-23 14:05:56
 * @LastEditors: cgt
 * @LastEditTime: 2021-12-29 15:51:17
-->
<template>
  <div class="container">
    <map-instance ref="map"></map-instance>
    <div class="toolbar">
      <el-button @click="capture">截图</el-button>
    </div>
  </div>
</template>

<script>
import MapInstance from './examples/SgMap';
export default {
  components: {
    MapInstance
  },
  data() {
    return {
      selected: 0
    };
  },
  methods: {
    capture() {
      this.$MapUtils.CaptureUtil.capture(this.$refs.map.$el, {
        imageType: 'image/png',
        doDownload: true,
        outputType: 'file'
      });
    }
  }
};
</script>

<style>
.el-container {
  width: 100%;
  height: 100%;
}
.el-aside {
  height: 100%;
}
.el-main {
  width: 100%;
  height: 100%;
  padding: 0;
}
</style>
<style scoped>
.container {
  position: relative;
  width: 100%;
  height: 100%;
}
.toolbar {
  position: absolute;
  top: 10px;
  right: 10px;
}
</style>
